A conventional Internet of things generally implements interconnection and interworking by using various wired or wireless communication networks, and uses conventional communications technologies. Recently, a technology of the Internet of things that uses visible light to propagate in free space and perform near field communication emerges. The Internet of things that uses a visible light communication technology is herein called a photonic Internet of things. The photonic Internet of things has functions of a conventional Internet of things, but communication is performed by using visible light.
Because visible light has high directivity and cannot penetrate a barrier, it is more secure than a radio communication manner. Therefore, on occasions such as a photonic Internet of things, visible light is phased in for near field communication. Currently, some visible light communication systems that perform encryption and decryption synchronously already exist in the photonic Internet of things. Such systems use a synchronization manner to cause a visible light transmitter and a receiver to always use the same and time-varying pseudocode sequence to perform encryption and decryption. The encryption and decryption of the visible light communication can lead to invalidity of a stroboscopic light signal that is shot and replicated by a high-speed camera, and make the signal unrecognizable to a receiver, which can remove security threats effectively.
In a handshake synchronization method used in the visible light communication system with synchronous encryption and decryption, an optical signal and baseband data are separately scrambled in a transmitter, then combined into a group of signals, and then modulated and transmitted. After the signals are received and demodulated at the receiver, pseudocode determination is performed for an encrypted optical signal; a pseudocode sequence used in encryption is queried and selected by means of traverse; then, the baseband data is decrypted; finally, an ID determiner is used to determine ID information obtained by decryption and ID information stored in a corresponding register and ultimately determine whether the signal is a legal signal or an illegally replicated signal, thereby finishing decryption.
The pseudocode sequence used for encryption in the transmitter and the pseudocode sequence used for decryption in the receiver are the same and time-varying. Therefore, a prerequisite of using the synchronization-based visible light communication system is that a time change in the visible light transmitter is completely consistent with that in the visible light receiver. That is, internal clocks of the transmitter and the receiver need to be completely consistent, and time errors need to be very small. With respect to crystal oscillator components used currently, complete consistency is hardly accomplishable. With increase of usage time, a time difference between time systems of the two is greater, and finally, synchronization information is lost, which leads to inconsistent state variation between the transmitter and the receiver. That is, when the pseudocode sequence used at one end changes, the other end does not reach a time point of change but continues using the original pseudocode sequence, thereby leading to a decryption failure.
In addition, a synchronization-based encryption method requires the transmitter and the receiver to perform time synchronization. Synchronization information is lost when one end encounters power outage. In order to recover the synchronization information after the end is powered on again, a reset signal needs to be used to cause the non-power-interrupted end to get synchronized again, which increases system complexity and may bring inconvenience of usage.